//
//  NavigationController.m
//  WChat
//
//  Created by lw on 2018/7/28.
//  Copyright © 2018年 mjsfax. All rights reserved.
//

#import "NavigationController.h"

@interface NavigationController ()

@end

@implementation NavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setup];
}

- (void)setup {
//    [self.navigationBar setBarStyle:UIBarStyleDefault];
//    [self.navigationBar setTranslucent:YES];
//    [self.navigationBar setBackgroundColor:[UIColor redColor]];
//    [self.navigationBar setTintColor:[UIColor greenColor]];
    [self.navigationBar setBarTintColor:[UIColor blackColor]];
    [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    //修改左右item主题色
//    self.navigationBar.tintColor = [UIColor whiteColor];
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count>=1) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

@end
